#include "os.h"

#ifdef _WIN32
#include "winit.h"
#include "wsys.h"
#include "wthread.h"
#include "wtime.h"
#include "wprocess.h"
#include "wdir.h"
#include "wstr.h"
#include "wprocess.h"
#else
#include "uinit.h"
#include "usys.h"
#include "uthread.h"
#include "utime.h"
#include "uprocess.h"
#include "udir.h"
#include "ustr.h"
#include "uprocess.h"
#endif

namespace log4x
{

void
os::init()
{
#ifdef _WIN32
    static winit ini;
#else
    static uinit ini;
#endif
}

isys*
os::sys()
{
#ifdef _WIN32
    static wsys sys;
#else
    static usys sys;
#endif
    return &sys;
}

ithread*
os::thread()
{
#ifdef _WIN32
    static wthread thread;
#else
    static uthread thread;
#endif
    return &thread;
}

itime*
os::time()
{
#ifdef _WIN32
    static wtime time;
#else
    static utime time;
#endif
    return &time;
}

idir*
os::dir()
{
#ifdef _WIN32
    static wdir dir;
#else
    static udir dir;
#endif
    return &dir;
}

istr*
os::str()
{
#ifdef _WIN32
    static wstr str;
#else
    static ustr str;
#endif
    return &str;
}

iprocess*
os::process()
{
#ifdef _WIN32
    static wprocess process;
#else
    static uprocess process;
#endif
    return &process;
}

}
